<template>
	<view class="main">
		<u-navbar
		title=" " 
		:is-back="false"
		title-size="34"
		:border-bottom="false"
		:background="background">
			<view class="header">
				<u-icon name="arrow-left" size="28" @tap="black"></u-icon>
				<view class="title">作品列表</view>
				<view class="ritbtn" @tap="toPage('/pages/SignUp/addWorks')">新增</view>
			</view>
		</u-navbar>
		<view class="content">
			<words-item></words-item>
		</view>
		<view class="no-data">
			<image src="" mode=""></image>
			<button type="default" @tap="toPage('/pages/SignUp/addWorks')">添加作品</button>
		</view>
	</view>
</template>

<script>
	import wordsItem from '@/components/works.vue'
	export default {
		components:{
			wordsItem
		},
		data(){
			return{
				background: {
					backgroundColor:"#4A90E2"
				},
				show:true,//是否显示完善简历弹窗
				jobWayShow:false,//是否展示职位要求弹窗
				timeShow:false,//是否展示接单时间弹窗
				label_style:{
					fontSize: '28rpx',
					color: '#333333',
					lineHeight: '40px'
				},
				
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		onReady() {
			
		},
		onPullDownRefresh() {
		    console.log('refresh');
		    setTimeout(function () {
		        uni.stopPullDownRefresh();
		    }, 1000);
		},
		methods: {
			//返回
			black(){
				uni.navigateBack()
			},
			toPage(url,islogin=false){
				this.more_show = false
				if(islogin){
					uni.navigateTo({
					    url: '/pages/Login/index'
					});
					return
				}
				uni.navigateTo({
				    url: url
				});
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		min-height: 100vh;
		padding:0 30rpx;
		background-color: #f9f9f9;
		.header{
			padding: 0 30rpx;
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #FFFFFF;
			font-weight: 400;
			color: #FFFFFF;
			line-height: 34rpx;
			.title{
				font-size: 34rpx;
			}
			.ritbtn{
				font-size: 28rpx;
				position: relative;
				z-index: 999999;
			}
		}
		.content{
			margin-top: 40rpx;
			/deep/.works_item:first-child{
				.item{
					border-top: 0;
				}
			}
		}
		.no-data{
			text-align: center;
			font-size: 0;
			position: absolute;
			left: calc(50% - 124rpx);
			top:35%;
			image{
				width: 225rpx;
				height: 225rpx;
				background: #C5CAD2;
			}
			button{
				width: 249rpx;
				height: 83rpx;
				background: #4A90E2;
				border-radius: 42rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 83rpx;
				margin-top: 80rpx;
				&::after{
					border: 0;
				}
			}
		}
	}
</style>
